How can I create a separate sorted copy of an array without modifying the original

welcome to shbcf.ru